﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Main.Master" AutoEventWireup="true"
    CodeBehind="DealerWSC.aspx.cs" Inherits="VSM.DealerWSC" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <script type="text/javascript">
        
        function openServiceDetail(gID) {
            window.location.href = "ServiceRequest.aspx?ServiceID=" + gID;
        };
    </script>
    <div>
        <asp:UpdatePanel ID="updatePanel" runat="server" UpdateMode="Always">
            <ContentTemplate>
                <asp:HiddenField ID="DealerCode" runat="server" />
                <h2>
                    Warranty Service
                </h2>
                <div style="margin-left: 5px; width: 99%;">
                    <hr />
                    <table border="0" width="100%" style="background-color: #D1D4D8;">
                        <tr>
                            <td class="FormLineItemAlt" style="width: 10%">
                                From Date:
                            </td>
                            <td class="FormLineItemAlt" style="width: 35%">
                                <asp:TextBox ID="txtFromDate" runat="server" Width="35%"></asp:TextBox>
                                <asp:ImageButton ID="ImageButton1" runat="Server" AlternateText="Click to show calendar"
                                    ImageUrl="~/Images/Calendar_scheduleHS.png" />
                                <cc1:CalendarExtender ID="CalendarExtender2" runat="server" TargetControlID="txtFromDate"
                                    PopupButtonID="ImageButton1" Format="dd/MM/yyyy">
                                </cc1:CalendarExtender>
                                ToDate:
                                <asp:TextBox ID="txtToDate" runat="server" Width="35%"></asp:TextBox>
                                <asp:ImageButton ID="ImageButton2" runat="Server" AlternateText="Click to show calendar"
                                    ImageUrl="~/Images/Calendar_scheduleHS.png" />
                            </td>
                            <td class="FormLineItemAlt" style="width: 10%">
                                &nbsp;
                            </td>
                            <td class="FormLineItemAlt" style="width: 35%">
                                <cc1:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="txtToDate"
                                    PopupButtonID="ImageButton2" Format="dd/MM/yyyy">
                                </cc1:CalendarExtender>
                            </td>
                        </tr>
                        <tr>
                            <td class="FormLineItemAlt" style="width: 10%">
                                Status:
                            </td>
                            <td class="FormLineItemAlt" style="width: 35%">
                                <asp:DropDownList ID="ddlStatus" runat="server" Width="35%">
                                </asp:DropDownList>
                            </td>
                            <td class="FormLineItemAlt" style="width: 15%">
                                &nbsp;
                            </td>
                            <td class="FormLineItemAlt" style="width: 35%">
                                &nbsp;
                            </td>
                        </tr>
                    </table>
                    <table border="0" width="100%" style="background-color: #D1D4D8;">
                        <tr>
                            <td class="FormLineItemAlt">
                                <asp:Button ID="btn_Filter" runat="server" BackColor="#1B7FC2" ForeColor="#FFFFFF"
                                    Height="30px" Text="Filter" Width="100px" OnClick="btn_Filter_Click" CausesValidation="false" />
                                <asp:Button ID="btn_Submit" runat="server" BackColor="#1B7FC2" ForeColor="#FFFFFF"
                                    Height="30px" Text="Submit" Width="90px" OnClick="btn_Submit_Click" />
                            </td>
                        </tr>
                    </table>
                    <table border="0" width="100%" style="background-color: #D1D4D8;">
                        <tr>
                            <td>
                                <asp:GridView ID="grvPO" OnRowCommand="GridView1_RowCommand" runat="server" CssClass="GridInner" Width="100%" BorderColor="White"
                                    BackColor="White" AllowSorting="True" AutoGenerateColumns="False" CellPadding="2"
                                    HeaderStyle-Height="27px" OnRowDataBound="grdItem_RowDataBound">
                                    <RowStyle BackColor="#D9E0ED" ForeColor="Black" BorderColor="White" BorderWidth="2px" Height="25px" />
                                    <AlternatingRowStyle BackColor="#EEF1F7" BorderColor="White" BorderWidth="2px" Height="25px"/>
                                    <Columns>
                                        
                                        <asp:TemplateField HeaderText="Action">
                                            <ItemStyle HorizontalAlign="Left" Width="100px" />
                                            <HeaderStyle VerticalAlign="Middle" />
                                            <ItemTemplate>
                                                <asp:Button ID="btnView" runat="server" Width="50px" Text="View" BackColor="#1B7FC2"
                                                    ForeColor="#FFFFFF" OnClientClick='<%#"openServiceDetail(\"" +Eval("GeneralID") +"\");" %>' />
                                                <asp:Button ID="btn_Submit" runat="server" Text="Submit" OnClick="btn_Submit_Click" />
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="#">
                                            <ItemStyle HorizontalAlign="Center" Width="20px" />
                                            <HeaderStyle VerticalAlign="Middle" />
                                            <ItemTemplate>
                                                <asp:Label ID="lblNo" runat="server" Text='<%# Bind("No") %>' BorderStyle="none">
                                                </asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="ID">
                                            <ItemStyle HorizontalAlign="Left" Width="10px" />
                                            <HeaderStyle VerticalAlign="Middle" Font-Bold="true" />
                                            <ItemTemplate>
                                                <asp:Label ID="lbDate" runat="server" Text='<%# Bind("GeneralID") %>'></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Service Date">
                                            <ItemStyle HorizontalAlign="Left" Width="70px" />
                                            <HeaderStyle VerticalAlign="Middle" Font-Bold="true" />
                                            <ItemTemplate>
                                                <asp:Label ID="lbDate" runat="server" Text='<%# Bind("ServiceDate","{0:dd/MM/yyyy}") %>'></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="VIN">
                                            <HeaderStyle VerticalAlign="Middle" />
                                            <ItemStyle HorizontalAlign="Center" Width="100px" />
                                            <ItemTemplate>
                                                <asp:Label ID="lbVIN" runat="server" Width="97%" Text='<%# Bind("VIN") %>' />
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Customer">
                                            <ItemStyle HorizontalAlign="Left" />
                                            <HeaderStyle VerticalAlign="Middle" Width="100px" />
                                            <ItemTemplate>
                                                <asp:Label ID="lbCustomer" Style="text-align: left" runat="server" Text='<%# Bind("CustomerName") %>' />
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Sequence No.">
                                            <ItemStyle HorizontalAlign="Left" />
                                            <HeaderStyle VerticalAlign="Middle" Width="100px" />
                                            <ItemTemplate>
                                                <asp:Label ID="lbCustomer" Style="text-align: left" runat="server" Text='<%# Bind("SeqNo") %>' />
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Condition Code">
                                            <ItemStyle HorizontalAlign="Left" />
                                            <HeaderStyle VerticalAlign="Middle" Width="100px" />
                                            <ItemTemplate>
                                                <asp:Label ID="lbCondCode" Style="text-align: left" runat="server" Text='<%# Bind("ConditionCode") %>' />
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Status">
                                            <ItemStyle HorizontalAlign="Left" />
                                            <HeaderStyle VerticalAlign="Middle" Width="100px" />
                                            <ItemTemplate>
                                                <asp:Label ID="lbStatus" Style="text-align: left" runat="server" Text='<%# Bind("StatusName") %>' />
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                    </Columns>
                                     <PagerStyle BackColor="#C6C3C6" ForeColor="Black" HorizontalAlign="Right" />
                                    <SelectedRowStyle BackColor="#9471DE" Font-Bold="true" ForeColor="White" />
                                    <HeaderStyle BackColor="#6095C9" Font-Bold="true" ForeColor="#ffffff" Font-Overline="False"
                                        Height="27px" VerticalAlign="Bottom" />
                                    <EmptyDataTemplate>
                                        No Data Found.
                                    </EmptyDataTemplate>
                                </asp:GridView>
                            </td>
                        </tr>
                    </table>
                </div>
            </ContentTemplate>
        </asp:UpdatePanel>
    </div>
</asp:Content>
